package com.lingnan.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * Excel监听器
 */
public class ExcelListener extends AnalysisEventListener {
    // 一行一行读取Excel内容
    @Override
    public void invoke(Object student, AnalysisContext analysisContext) {
        System.out.println("====="+student+"=====");
    }

    // 读取表头内容
    @Override
    public void invokeHead(Map headMap, AnalysisContext context) {
        System.out.println("表头信息:"+headMap);
    }

    // 读取完成之后操作
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
